home *** CD-ROM | disk | FTP | other *** search
/ System Booster / System Booster.iso / Archives / ARexxTools / AGGrep.lha / DoArgs.rexx < prev    next >
Encoding:
OS/2 REXX Batch file  |  1995-11-28  |  1.2 KB  |  36 lines

  1. /* Argument gatherer                                        */
  2. /*                                                          */
  3. /* Brian Gragg 10/1/95                                      */
  4. /*                                                          */
  5. /* arguments: x y prompt string canceltext pubscreen cmd    */
  6. /* empty arguments will cancel the command                  */
  7. /*                                                          */
  8. /* call from shell like this:                               */
  9. /*  rx doargs 10,10,The Title,Default,Cancel,WORKBENCH,dir all  */
  10.  
  11. if ~show("L","rexxarplib.library") then do
  12.     if addlib("rexxarplib.library",0,-30,0) then
  13.         say "Added rexxarplib.library."
  14.     else do
  15.         say "RexxArpLib.library not available."
  16.         exit 10
  17.         end
  18.     end
  19.  
  20.  
  21. /* these are for example*/
  22. x = 100
  23. y = 100
  24. prompts = "Enter grep options\okay\cancel"
  25. string = "-$ "
  26. canceltext = "Cancel"
  27. publicscreen = "WORKBENCH"
  28. cmd = "sys:rexxc/rx aggrep"
  29.  
  30. parse arg x ',' y ',' prompts ',' string ',' canceltext ',' pubscreen ',' cmd
  31.  
  32. arguments = Request(x, y, prompts, string, , canceltext, publicscreen)
  33.  
  34. if arguments ~= "" then
  35.     address command cmd arguments
  36.